import axios from 'axios';

const axiosInstance = axios.create({
    baseURL: 'http://localhost:8080/api/v1', // 替换为你的 API 基础路径
    timeout: 40000, // 请求超时时间
    headers: {
        'Content-Type': 'application/json',
    },
});

const axiosPlugin = {
    install(app) {
        app.config.globalProperties.$axios = axiosInstance;
    },
};

export default axiosPlugin;
export { axiosInstance };
